package com.ch01;

import java.util.function.Consumer;
import java.util.function.IntPredicate;

public class FunctionDemo {
	public static void main(String[] args) {
		//断言函数
		//Predicate<Integer> predicate = i -> i>0;
		IntPredicate predicate = i -> i>0;
		System.out.println(predicate.test(-10));
		//消费函数
		Consumer<String> consumer = s -> System.out.println(s);
		consumer.accept("输入数据");
	}
}
